package cz.muni.fi.pv168.ContactManager;

/**
 * Created by IntelliJ IDEA.
 * User: Vlado
 * Date: 4.3.2012
 * Time: 16:52
 * To change this template use File | Settings | File Templates.
 */
public class Person {
    private String firstName;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o)
    {
        if(o == null) return false;
        if(o == this) return true;
        if(!(o instanceof Person)) return false;
        Person p = (Person) o;
        return (p.getId() == getId()) && p.getFirstName().equals(getFirstName()) && p.getLastName().equals(getLastName());
    }
    
    private String lastName;
    private Long id;
    public Person() {}
}
